unit forApgar_Help;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;

type
  TApgar_Help = class(TForm)
    rgSkin: TRadioGroup;
    rgCHSS: TRadioGroup;
    rgRefleks: TRadioGroup;
    RgMuskls: TRadioGroup;
    rgBreash: TRadioGroup;
    lbSkin: TLabel;
    lbCHSS: TLabel;
    lbRefleks: TLabel;
    lbMuskls: TLabel;
    lbBreash: TLabel;
    Label1: TLabel;
    Label2: TLabel;
    lbSumm: TLabel;
    procedure rgSkinClick(Sender: TObject);
    procedure rgCHSSClick(Sender: TObject);
    procedure rgRefleksClick(Sender: TObject);
    procedure RgMusklsClick(Sender: TObject);
    procedure rgBreashClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    a1,a2,a3,a4,a5:integer;
  end;

var
  Apgar_Help: TApgar_Help;

implementation

{$R *.dfm}

procedure TApgar_Help.rgBreashClick(Sender: TObject);
begin
a1:=rgBreash.ItemIndex;
lbBreash.Caption:=IntToStr(rgBreash.ItemIndex);
lbSumm.Caption:=IntToStr(a1+a2+a3+a4+a5);
end;

procedure TApgar_Help.rgCHSSClick(Sender: TObject);
begin
a2:=rgCHSS.ItemIndex;
lbCHSS.Caption:=IntToStr(rgCHSS.ItemIndex);
lbSumm.Caption:=IntToStr(a1+a2+a3+a4+a5);
end;

procedure TApgar_Help.RgMusklsClick(Sender: TObject);
begin
a3:= rgMuskls.ItemIndex;
lbMuskls.Caption:=IntToStr(rgMuskls.ItemIndex);
lbSumm.Caption:=IntToStr(a1+a2+a3+a4+a5);
end;

procedure TApgar_Help.rgRefleksClick(Sender: TObject);
begin
a4:= rgRefleks.ItemIndex;
lbRefleks.Caption:=IntToStr(rgRefleks.ItemIndex);
lbSumm.Caption:=IntToStr(a1+a2+a3+a4+a5);
end;

procedure TApgar_Help.rgSkinClick(Sender: TObject);
begin
a5:=rgSkin.ItemIndex;
lbSkin.Caption:=intToStr(rgSkin.ItemIndex);
lbSumm.Caption:=IntToStr(a1+a2+a3+a4+a5);
end;

end.
